From 18a86b00d2eaad454aba6053456c972d3ae54d95 Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Mon, 7 Aug 2017 09:05:02 -0700 Subject: [PATCH] [bin/init] Update USAGE --- src/bin/init.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bin/init.rs b/src/bin/init.rs index be02789ec..50afe9bea 100644 --- a/src/bin/init.rs +++ b/src/bin/init.rs @@ -18,7 +18,7 @@ pub struct Options { } pub const USAGE: &'static str = " -Create a new cargo package in current directory +Create a new cargo package in an existing directory Usage: cargo init [options] [] @@ -27,8 +27,9 @@ Usage: Options: -h, --help Print this message --vcs VCS Initialize a new repository for the given version - control system (git or hg) or do not initialize any version - control at all (none) overriding a global configuration. + control system (git, hg, pijul, or fossil) or do not + initialize any version control at all (none), overriding + a global configuration. --bin Use a binary (application) template --lib Use a library template [default] --name NAME Set the resulting package name @@ -49,11 +50,11 @@ pub fn execute(options: Options, config: &Config) -> CliResult { let Options { flag_bin, flag_lib, arg_path, flag_name, flag_vcs, .. } = options; - let tmp = &arg_path.unwrap_or(format!(".")); + let path = &arg_path.unwrap_or(format!(".")); let opts = ops::NewOptions::new(flag_vcs, flag_bin, flag_lib, - tmp, + path, flag_name.as_ref().map(|s| s.as_ref())); let opts_lib = opts.lib; -- 2.30.2